Set the right parent root window for the offscreen windows
authorAlexander Larsson <alexl@redhat.com>
Thu, 4 Jun 2009 06:05:51 +0000 (08:05 +0200)
committerAlexander Larsson <alexl@redhat.com>
Fri, 5 Jun 2009 13:18:36 +0000 (15:18 +0200)
tests/gtkoffscreenbox.c

index 5a0749bd264915a334c9a8d9b8dc75bb1067ad48..d5a2d20ecdcbdc24d211ba5e8d59d8a670ac31a5 100644 (file)
@@ -118,7 +118,7 @@ gtk_offscreen_box_realize (GtkWidget *widget)
       attributes.height = offscreen_box->child1->allocation.height;
       start_y += offscreen_box->child1->allocation.height;
     }
-  offscreen_box->offscreen_window1 = gdk_window_new (NULL,
+  offscreen_box->offscreen_window1 = gdk_window_new (gtk_widget_get_root_window (widget),
                                                     &attributes, attributes_mask);
   gdk_window_set_user_data (offscreen_box->offscreen_window1, widget);
   if (offscreen_box->child1)
@@ -132,7 +132,7 @@ gtk_offscreen_box_realize (GtkWidget *widget)
       attributes.width = offscreen_box->child2->allocation.width;
       attributes.height = offscreen_box->child2->allocation.height;
     }
-  offscreen_box->offscreen_window2 = gdk_window_new (NULL,
+  offscreen_box->offscreen_window2 = gdk_window_new (gtk_widget_get_root_window (widget),
                                                     &attributes, attributes_mask);
   gdk_window_set_user_data (offscreen_box->offscreen_window2, widget);
   if (offscreen_box->child2)